import Vue from 'vue';
import Router from 'vue-router';
import App from '../App';
import TreeViewIndex from '../components/TreeViewIndex';
import TreeViewRegion from "../components/TreeViewRegion";
import TreeViewChecker from "../components/TreeViewChecker";
import TreeViewRepair from "../components/TreeViewRepair";
import TreeViewReceiver from "../components/TreeViewReceiver";
import TreeViewMaterial from "../components/TreeViewMaterial";
import Home from "../components/Home";
import MainBar from "../components/MainBar";

Vue.use(Router)
export default new Router({
  linkActiveClass: 'selected',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      redirect: '/Home',
      children:[
        {
          path: '/Home',
          name: '主要区域',
          component: MainBar,
          children:[
            {
              path: '/Home/TreeViewIndex',
              name: '首页',
              component: TreeViewIndex,
            },
            {
              path: '/Home/region/index',
              name: '区域管理',
              component: TreeViewRegion,
            },
            {
              path: '/Home/repair/index',
              name: '报修单',
              component: TreeViewRepair,
            },
            {
              path: '/Home/receiver/index',
              name: '接单人',
              component: TreeViewReceiver,
            },
            {
              path: '/Home/checker/index',
              name: '审核员',
              component: TreeViewChecker ,
            },
            {
              path: '/Home/material/index',
              name: '耗材材料',
              component: TreeViewMaterial,
            }
          ]
        }
      ]
    }
  ]
})
